<!--
Auteur: Frank den Broeder
Stundentnummer: s1049444
Klas: IS1d
-->
<html>
    <head>
        <title>            
        </title>
        <link rel="stylesheet" type="text/css" href="../../layout/mystyle.css">
    </head>
    <body>
        <SPAN CLASS="text_h1">Catogorie Zoeken</SPAN>
        <BR>
        <BR>
        <SPAN CLASS="text_normal">
        <form action="index.php?page=catrapport" method="POST">
            <input type="text" name="naam_evenement"/>
            <input type="submit" value="Zoeken"/>
        </form>
		<BR>
		<hr>
		<BR>
		</SPAN>
        </body>    
</html>
		
<?php
if (isset($_POST['naam_evenement'])){
    $naam_evenement = $_POST['naam_evenement'];
    include ($_SERVER['DOCUMENT_ROOT'].'/config/connect.php');
    $result = mysql_query("SELECT naam, evenementid FROM evenement WHERE naam LIKE '%$naam_evenement%' ORDER BY naam");
	
    print('<table class="catogoriezoeken">');
    print('<tr><th>Naam</th>');
    print('<th>Evenementid</th>');
    
    print('<tr>');
    print('<tr>');
    for($i = 0;$i< mysql_num_rows($result);$i++){
        $row = mysql_fetch_assoc($result);
        $v = $row['evenementid'];
        print('<td>' . '<a href="index.php?page=wijzig-evenement&id=' . $v .'"' . '>'. $row['naam'] . '</td>');
        print('<td>' . $row['evenementid'] . '</td>');
        print('</tr>');
     }
     print('</tr>' . '</table>');
     print('<br/>');
}
?>

